*cd "C:\Users\wb269235\OneDrive - WBG\LDriveWBG\dofile\education\Vietnam\edu45\submission\EDCC\R&R2\"
cd "D:\dofile\education\Vietnam\edu45\first_generation\submission\EDCC\final"

*use "C:\dofile\education\Vietnam\edu45\submission\EDCC\R&R1\data for figure 2.dta"
use "data for figure 2.dta"
twoway (scatter educationyrs1 cohort if sex==0, connect(l) lcol(orange) msym(c) msize(small) mcol(orange))  ///
	(scatter educationyrs0 cohort if sex==0, connect(l) lcol(orange) msym(c) msize(small) mcol(orange) lpat(dash)) ///
	(scatter educationyrs1 cohort if sex==1, connect(l) lcol(green) msym(s) msize(small) mcol(dkgreen))  ///
	(scatter educationyrs0 cohort if sex==1, connect(l) lcol(green) msym(s) msize(small) mcol(dkgreen) lpat(dash)), yti("Years of education ") ///
	xline(1, lpat(dot)) xline(2, lpat(dot)) xline(3, lpat(shortdash_dot)) xline(4, lpat(longdash_dot)) ///
	text(4.8 4.5 "treated", place(se) box margin(l+1 r+1 t+1 b+1)) ///
	text(3 4.2 "partially treated", place(se) box margin(l+1 r+1 t+1 b+1)) ///
	text(1.8 2.3 "control", place(se) box margin(l+1 r+1 t+1 b+1)) ///
	xlab(1(1)7, value angle(30)) graphregion(color(white)) plotregion(style(none)) ///
	xti("Birth year") legend(label(1 "Girls, Vietminh provinces") label(2 "Girls, French provinces") ///
	label(3 "Boys, Vietminh provinces") label(4 "Boys, French provinces") ) yscale(range(0 10)) scale(0.9) ///
	note("Notes: Treated, partially treated, and control periods are respectively 1940-45, 1936-39, and 1924-35" "as depicted above.")

graph play figure 2_final.grec
graph save "figure2_final.gph"

*get black & white color graph for copying to Word	
set copycolor gs1 